package com.btkjgc.framework.report;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Rong on 2015/4/7.
 */
public class Table
{
	static public Integer PAGE_FALSE = 0;
	static public Integer PAGE_TRUE = 1;
	static public Integer SORT_FALSE = 0;
	static public Integer SORT_TRUE = 1;
	String tableTitle = "";
	String tableId = "formsToolTable0";
	List<String> tableHeadList = new ArrayList<String>();
	// 排序功能的制作流程是：先把文本写入表头，再提取表头的HTML，添加<a>,因此，可以在超链接的文本中插入HTML，如<br>
	// 而排序标签上的文本则是纯文本，不包含html.解析时，以表头文本为标准解析,逗号隔开
	List<Integer> tableHeadLinkList = new ArrayList<Integer>(); // 需要加超链接的表头的下标列表--用于排序功能.从0
																// 开始
	List<List<String>> tableDataList = null;

	Integer isSort = 0;// 表格是否添加动态标签排序功能：0-不添加，1-添加, 1的时候 tableHeadLinkList
						// 添加超链接

	Integer isPage = PAGE_FALSE;// 是否是分页结构,0-无分页结构，1-分页结构
	Integer itemsPerPage = 15;// 每页的行数
	Integer DisplayEntries = 10;// 页码显示的个数
	Integer currentpage = 0;
	Integer totalRecord = 1;

	public Table()
	{
	}

	public Table(String tableTitle, List<String> tableHeadList,
			List<List<String>> tableDataList)
	{
		this.tableTitle = tableTitle;
		this.tableHeadList = tableHeadList;
		this.tableDataList = tableDataList;
	}

	public String getTableTitle()
	{
		return tableTitle;
	}

	public void setTableTitle(String tableTitle)
	{
		this.tableTitle = tableTitle;
	}

	public String getTableId()
	{
		return tableId;
	}

	public void setTableId(String tableId)
	{
		this.tableId = tableId;
	}

	public List<String> getTableHeadList()
	{
		return tableHeadList;
	}

	public void setTableHeadList(List<String> tableHeadList)
	{
		this.tableHeadList = tableHeadList;
	}

	public List<List<String>> getTableDataList()
	{
		return tableDataList;
	}

	public void setTableDataList(List<List<String>> tableDataList)
	{
		this.tableDataList = tableDataList;
	}

	public Integer getIsSort()
	{
		return isSort;
	}

	public void setIsSort(Integer isSort)
	{
		this.isSort = isSort;
	}

	public Integer getIsPage()
	{
		return isPage;
	}

	public void setIsPage(Integer isPage)
	{
		this.isPage = isPage;
	}

	public Integer getItemsPerPage()
	{
		return itemsPerPage;
	}

	public void setItemsPerPage(Integer itemsPerPage)
	{
		this.itemsPerPage = itemsPerPage;
	}

	public Integer getDisplayEntries()
	{
		return DisplayEntries;
	}

	public void setDisplayEntries(Integer displayEntries)
	{
		DisplayEntries = displayEntries;
	}

	public Integer getCurrentpage()
	{
		return currentpage;
	}

	public void setCurrentpage(Integer currentpage)
	{
		this.currentpage = currentpage;
	}

	public Integer getTotalRecord()
	{
		return totalRecord;
	}

	public void setTotalRecord(Integer totalRecord)
	{
		this.totalRecord = totalRecord;
	}

	public List<Integer> getTableHeadLinkList()
	{
		return tableHeadLinkList;
	}

	public void setTableHeadLinkList(List<Integer> tableHeadLinkList)
	{
		this.tableHeadLinkList = tableHeadLinkList;
	}

	public List<String> addTableHeadList()
	{
		List<String> temp = new ArrayList<String>();
		this.tableHeadList = temp;
		return this.tableHeadList;
	}

	public void addTableDataList(List<String> temp)
	{
		this.tableDataList.add(temp);
	}
}
